package com.junbao.androidinterview.proxy.jingtai;

/**
 * author : Majunbao
 * github : https://github.com/MaJunBaox
 * time   : 2022/8/9 12:15 下午
 * desc   : 静态代理
 */
public class ProxyLawyer implements Subject{

    private  Subject subject;

    public ProxyLawyer(Subject subject) {
        this.subject =subject;
    }

    @Override
    public void lawsuit() {
        before();
        subject.lawsuit();
        after();
    }

    private void before() {
        System.out.println("签合同");
    }

    private void after() {
        System.out.println("收佣金");
    }


}
